<template>
  <view class="content pt-50">
      <view class="list-block">
          <view class="item-block">
        <view class="item-box" @click="routeByUrl('/pagesDanger/checkTaskList')">
         <image
            class="item-icon"
            src="../static/images/troubleshooting-task.png"
          ></image>
          <view class="item-tit">排查任务执行</view>
        </view>
        <view class="item-box" @click="routeByUrl('/pagesDanger/index')">
          <image
            class="item-icon"
            src="../static/images/hiddendanger-trouble.png"
          ></image>
          <view class="item-tit">隐患排查治理</view>
        </view>
        <view class="item-box" @click="routeByUrl('/pagesDanger/handClapList')">
          <image class="item-icon" src="../static/images/hand-clap.png"></image>
          <view class="item-tit">随手拍</view>
        </view>
   </view>
      </view>
   
  </view>
</template>

<script>
  import { getUserInfoApi } from '@/apis/auth/index.js'
  import { setUserInfo } from '@/utils/auth.js'
  
  export default {
    onShow() {
      this.getUserInfo()
    },
    methods: {
      getUserInfo: function() {
        getUserInfoApi().then(res => {
          setUserInfo(res)
        }).catch(err => console.warn(err))
      },
      routeByUrl: function(url) {
        uni.navigateTo({ url })
      }
    }
  }
</script>

<style lang="scss" scoped>
.content {
  width: 100%;
  height: 115vh;
//   background: #efefef;
  display: flex;
  align-items: center;
  flex-direction: column;
  .list-block {
    width: 96%;
    // background: #ffffff;
    border-radius: 15rpx;
    margin-top: 30rpx;
    .list-tit {
      height: 80rpx;
      font-size: 28rpx;
      font-family: Source Han Sans CN;
      font-weight: 500;
      color: #0c0c0c;
      line-height: 80rpx;
      margin-left: 30rpx;
    }
    .list-line {
      width: 90%;
      margin-left: 30rpx;
      height: 1rpx;
      background: #dfdede;
    }
    .item-block {
      margin-left: 30rpx;
      display: flex;
      .item-box {
        text-align: center;
        width: 30%;
        .item-tit {
          height: 70rpx;
          font-size: 24rpx;
          font-family: Source Han Sans CN;
          font-weight: 400;
          color: #0c0c0c;
          line-height: 70rpx;
        }
        .item-icon {
          text-align: center;
          width: 58rpx;
          height: 61rpx;
          padding: 25rpx 25rpx 0 25rpx;
        }
      }
    }
  }
}
</style>
